Fix Postgrex/Ecto type bootstrap for pg_catalog queries#10308
Open
borodark wants to merge 6 commits intocube-js:masterfrom
Open
Fix Postgrex/Ecto type bootstrap for pg_catalog queries#10308borodark wants to merge 6 commits intocube-js:masterfrom
borodark wants to merge 6 commits intocube-js:masterfrom
Conversation
…k type information after bootstrap_
- Fix clippy warning for useless .into_iter() in cross_join_to_left_join - Apply cargo fmt formatting to cross_join_to_left_join.rs - Update DBeaver and PowerBI introspection snapshots for pg_type changes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5316d22 to
7f30707
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #10307
Tested and verified in this PR: borodark/power_of_three#7
This PR fixes Postgrex/Ecto connectivity to Cube SQL API by addressing two issues:
Filter(CrossJoin), losing LEFT JOIN semantics and causing type bootstrap to failtypsend,typoutput,typreceivecolumns were missing or NULLChanges
New Files
rust/cubesql/cubesql/src/compile/engine/df/optimizers/cross_join_to_left_join.rsNew optimizer rule that detects
Filter(CrossJoin)patterns for pg_catalog tables and converts them back to properLeftJoinoperations.Key features:
Modified Files
rust/cubesql/cubesql/src/compile/engine/df/optimizers/mod.rsCrossJoinToLeftJoinoptimizerrust/cubesql/cubesql/src/compile/query_engine.rsCrossJoinToLeftJointo optimizer pipeline (runs first)rust/cubesql/cubesql/src/compile/engine/information_schema/postgres/pg_type.rstypsend,typoutput,typreceivecolumns with proper OID valuesrust/cubesql/pg-srv/src/pg_type.rsTest Updates
Testing
Repo.all,Repo.one)where: field == ^value)group_by,sum,count)Example Usage
After this fix, Elixir developers can query Cube using familiar Ecto patterns:
Closes
Closes #10307 (Postgrex/Ecto type bootstrap fails with pg_catalog LEFT JOIN queries)